﻿<%@ Page Title="" Language="C#" Theme = "DetailsView"MasterPageFile="~/Managers.master" AutoEventWireup="true" CodeFile="MVisitorsUngo.aspx.cs" Inherits="MVisitorsUngo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DetailsView 
         ID = "dtlVisitor"
         DataSourceID = "srcVisitor"
         DataKeyNames = "id"         
         SkinID = "Colorful"
         EmptyDataText = "没有未走的采访者"
         HeaderText = "未走的来访者"
         AutoGenerateEditButton = "true"
         FooterText = "如果离开，请选择确认离开"
         AutoGenerateRows = "false"
         AllowPaging = "true"
         runat = "server">
         <Fields>
         <asp:BoundField 
             DataField = "visitname"
             HeaderText = "姓名" 
             ReadOnly = "true"/>
        <asp:BoundField 
             DataField ="sname"
             HeaderText = "被访者姓名" 
             ReadOnly = "true"/>           
        <asp:BoundField 
             DataField =  "b_n"
             HeaderText = "楼号" 
             ReadOnly = "true"/>
        <asp:BoundField 
             DataField =  "d_n"
             HeaderText = "宿舍号" 
             ReadOnly = "true"/>
        <asp:BoundField 
             DataField = "cometime"
             HeaderText = "到来时间" 
             ReadOnly = "true"/>
        <asp:BoundField 
             DataField = "leavetime"
             HeaderText = "离开时间" />
        <asp:CheckBoxField 
             DataField = "go"
             HeaderText = "是否离开" />     
         </Fields>
     </asp:DetailsView>
     <asp:SqlDataSource 
         ID = "srcVisitor"
         ConnectionString = "<%$ ConnectionStrings:Dormitory %>"
         SelectCommand  = "select * from cometovisit where go = 'false'"
         UpdateCommand = "update cometovisit set leavetime = @leavetime,
         go = @go where id = @id"
         runat = "server" ></asp:SqlDataSource>
</asp:Content>

